20th of June 2019

Data

We use a dataset with geolaction of the main cities in Spain, as well as data regarding male and female population, region and province.

## 'data.frame':    8112 obs. of  9 variables:
##  $ region    : Factor w/ 18 levels "Andalucía","Aragón",..: 1 1 1 1 1 1 1 1 1 1 ...
##  $ province  : Factor w/ 52 levels "A Coruña","Álava",..: 5 5 5 5 5 5 5 5 5 5 ...
##  $ city      : Factor w/ 8095 levels "Ababuj","Abades",..: 32 36 56 168 199 208 262 279 295 415 ...
##  $ lat       : num  37.1 37.1 36.7 37.3 37 ...
##  $ lng       : num  -2.78 -2.8 -3.02 -2.18 -2.62 ...
##  $ altitude  : num  871 977 11 481 388 ...
##  $ population: int  1504 1341 24373 815 674 11178 908 603 141 724 ...
##  $ males     : int  783 682 12338 422 334 5731 486 315 74 363 ...
##  $ females   : int  721 659 12035 393 340 5447 422 288 67 361 ...

Plot.ly example

Population of cities above 10,000 habitants in Spain, comparing poulation and altitude, showing different regions with different colors.

Thank you

Carlos Ochoa

20th June of 2019